<?php
if (strlen($_POST['destinatario']) > 0) {
    
  $nome = $_POST['nome'];
  $email = $_POST['email'];
  $destinatario = $_POST['destinatario'];
  $assunto = $_POST['assunto'] ;
  $message = $_POST['message'] ;
  
  //echo "Nome: " . $nome ."<br>";
  //echo "email: " . $email ."<br>";
  //echo "Destinatario: " . $destinatario ."<br>";
  //echo "Assunto: " . $assunto . "<br>";
  //echo "Mensagem:" . $message ."<br>";
    
  mail($destinatario, $assunto, $message, "From: ". $nome . " <" . $email . ">\r\n");
  header('Location: ../../inicio.php?msg=15');
  }
  else {
      header('Location: ../../inicio.php?msg=16');
  }
?>